package model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the operator database table.
 * 
 */
@Entity
public class Operator implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="operator_id")
	private int operatorId;

	private byte active;

	private String email;

	private String name;

	@Column(name="role_code")
	private String roleCode;

	private String telephone;

	//bi-directional many-to-one association to Servicecall
	@OneToMany(mappedBy="operator")
	private Set<ServiceCall> servicecalls;

	//bi-directional many-to-one association to Task
	@OneToMany(mappedBy="operator")
	private Set<Task> tasks;

    public Operator() {
    }

	public int getOperatorId() {
		return this.operatorId;
	}

	public void setOperatorId(int operatorId) {
		this.operatorId = operatorId;
	}

	public byte getActive() {
		return this.active;
	}

	public void setActive(byte active) {
		this.active = active;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRoleCode() {
		return this.roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public Set<ServiceCall> getServicecalls() {
		return this.servicecalls;
	}

	public void setServicecalls(Set<ServiceCall> servicecalls) {
		this.servicecalls = servicecalls;
	}
	
	public Set<Task> getTasks() {
		return this.tasks;
	}

	public void setTasks(Set<Task> tasks) {
		this.tasks = tasks;
	}
	
	public String toString(){
		return ""+this.getOperatorId();
	}
	
}